<script type="text/javascript">
    jQuery(function($) {

        $('#totalMetar').ace_spinner({value: ${metarGroupDataFormBean.totalMetar}, min: 0, max: 200, step: 1, btn_up_class: 'btn-info', btn_down_class: 'btn-info'})
                .on('change', function() {
                    //alert(this.value)
                });
        $('#totalSpeci').ace_spinner({value: ${metarGroupDataFormBean.totalSpeci}, min: 0, max: 200, step: 1, btn_up_class: 'btn-info', btn_down_class: 'btn-info'})
                .on('change', function() {

                });
        $('#totalMetarAtrasado').ace_spinner({value: ${metarGroupDataFormBean.totalMetarAtrasado}, min: 0, max: 200, step: 1, btn_up_class: 'btn-info', btn_down_class: 'btn-info'})
                .on('change', function() {

                });
        $('#totalSpeciAtrasado').ace_spinner({value: ${metarGroupDataFormBean.totalSpeciAtrasado}, min: 0, max: 200, step: 1, btn_up_class: 'btn-info', btn_down_class: 'btn-info'})
                .on('change', function() {

                });
         $('#totalMetarAusente').ace_spinner({value: ${metarGroupDataFormBean.totalMetarAusente}, min: 0, max: 200, step: 1, btn_up_class: 'btn-info', btn_down_class: 'btn-info'})
                .on('change', function() {

                });
          $('#totalLOCAL').ace_spinner({value: ${metarGroupDataFormBean.totalLOCAL}, min: 0, max: 200, step: 1, btn_up_class: 'btn-info', btn_down_class: 'btn-info'})
                .on('change', function() {

                });

        $('.chosen-select').chosen({allow_single_deselect: true});
        //resize the chosen on window resize
        $(window).on('resize.chosen', function() {
            var w = $('.chosen-select').parent().width();
            $('.chosen-select').next().css({'width': w});
        }).trigger('resize.chosen');

        //datepicker plugin
        //link
        $('.date-picker').datepicker({
            format: "mm/yyyy",
            viewMode: "months",
            minViewMode: "months",
            autoclose: true,
            todayHighlight: true
        }).next().on(ace.click_event, function() {
            $(this).prev().focus();
        });


    });

</script>